const http  = require('http')

const serve = http.createServer()
//req是请求对象 包含了与客服端相关的数据和属性
serve.on('request',(req) =>{
    const url = req.url
    const methods = req.method
    const str = `Your request url is ${url},and request methon is  ${methods}`
    console.log(str);
})
serve.listen(80,()=> {
    console.log('server running at http://127.0.0.1');
})